import { useDispatch, useSelector, useStore } from "react-redux";
import { RootState, AppDispatch, AppStore } from ".";
/**
 * React Redux v9.1.0为每个钩子添加了一个新的.withTypes方法,
 * 类似于Redux Toolkit的createAsyncThunk上发现的.withTypes方法。
 */
export const useAppDispatch = useDispatch.withTypes<AppDispatch>();
export const useAppSelector = useSelector.withTypes<RootState>();
export const useAppStore = useStore.withTypes<AppStore>();